package com.yupi.longojbackendserviceclient.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.longojbackendmodel.dto.question.QuestionQueryRequest;
import com.yupi.longojbackendmodel.entity.Question;
import com.yupi.longojbackendmodel.entity.QuestionSubmit;
import com.yupi.longojbackendmodel.vo.QuestionVO;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
题目服务
*/
@FeignClient(name="longoj-backend-question-service",path="/api/question/inner")
public interface QuestionFeignClient {

    /**
     * 根据id获取题目
     * @param questionId
     * @return
     */
    @GetMapping("/get/id")
    Question qusetionById(@RequestParam("questionId") Long questionId);


    @GetMapping("/question_submit/get/id")
    QuestionSubmit questionSubmitById(@RequestParam("questionSubmitId") Long questionSubmitId);


    @PostMapping("/question_submit/update")
    Boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);

}
